<div class="max-height">
    <form class="searchbar">
        <div class="input-group form-inline">
            <div class="input-group">
                <input type="text" placeholder="请输入模板名" class="form-control" ng-model="name">
                <span class="input-group-btn">
                    <button type="submit" class="btn btn-default" ng-click="search(name)">
                        <span class="fa fa-search"></span>
                    </button>
                </span>
            </div>
        </div>
        <div class="input-group tool-bar">
            <button type="button" class="btn btn-default" ng-click="addTemplate()">
                <span class="fa fa-plus"></span> 添加模版
            </button>
        </div>
    </form>
    <a-page-grid option="options" params="params" name="templateTable" count="false"></a-page-grid>
</div>
<script type="text/ng-template" id="templateDialog">
    <form name="templateForm" ng-submit="submit();">
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="panel-title text-center text-bold">模板</div>
            </div>
            <div class="panel-body">
                <fieldset>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">模版名称</label>

                        <div class="col-sm-9">
                            <input type="text" name="title" class="form-control" ng-model="template.title">
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">模版类型</label>

                        <div class="col-sm-9">
                            <select name="type" class="form-control"
                                    ng-options="name for (name , value) in types"
                                    ng-model="template.type"></select>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">媒体文件</label>

                        <div class="col-sm-9">
                            <input type="file" ngf-select name="file" class="form-control" ng-model="template.file">
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">模版内容</label>

                        <div class="col-sm-9">
                            <input type="text" name="content" class="form-control" ng-model="template.content">
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="panel-footer text-center">
                <button type="submit" class="btn btn-info">确认</button>
                <button type="button" class="btn btn-info">取消</button>
            </div>
        </div>
    </form>
</script>